import { get, post, put, del } from '../fetch/api'
//登陆
export const login = params => post('/sys/login', params)

//查询所有用户
export const users = params => get('/sys/user/findAll', params)

//新增用户 
export const addUser = params => post('/sys/user/add', params)

//删除用户
// export const delUser = params => del('/sys/user/delete', params)
export const delUser = params => del('/sys/user/delete', params)

//修改用户 
// export const putUser = params => put('/sys/user/update', params)
export const putUser = params => post('/sys/user/update', params)

//新增角色
export const addRole = params => post('/sys/role/add', params)

//删除角色
// export const delRole = params => del('/sys/role/delete', params)
export const delRole = params => del('/sys/role/delete', params)

//修改角色
// export const putRole = params => put('/sys/role/update', params)
export const putRole = params => post('/sys/role/update', params)

//所有角色分页
export const allRoles = params => get('/sys/role/findAll', params)
export const getAllRoles = params => get('/sys/role/getAll', params)


//新增机构
export const addOrganization = params => post('/organization/add', params)

//删除机构
// export const delOrganization = params => del('/organization/delete', params)
export const delOrganization = params => del('/organization/delete', params)

//修改机构
// export const putOrganization = params => put('/organization/update', params)
export const putOrganization = params => post('/organization/update', params)

//查询所有机构(分页)
export const allOrganizations = params => get('/organization/findAll', params)
//查询所有机构
export const allOrg = () => get('/organization/getAll')
//新增专家
export const addExpert = params => post('/expert/add', params)

//删除专家
// export const delExpert = params => del('/expert/delete', params)
export const delExpert = params => del('/expert/delete', params)

//修改专家
// export const putExpert = params => put('/expert/update', params)
export const putExpert = params => post('/expert/update', params)

//查询所有专家
export const allExpert = params => get('/expert/findAll', params)

//新增文章分类
export const addArticleType = params => post('/articleSort/add', params)

//删除文章分类
// export const delArticleType = params => del('/articleSort/delete', params)
export const delArticleType = params => del('/articleSort/delete', params)

//修改文章分类
// export const putArticleType = params => put('/articleSort/update', params)
export const putArticleType = params => post('/articleSort/update', params)
//查询所有的二级文章分类
export const secondType = () => get('/articleSort/getJuniorAll')

export const firstType = (params) => get('/articleSort/getArticleSort', params)

//查询所有文章分类 
export const allArt = () => get('/articleSort/getAll')
//分布查询文章分类
export const getAllArticelType = params => get('/articleSort/findAll', params)

//文件上传
export const uploadFile = params => post('/resource/upload', params)

//新增文章
export const addArticle = params => post('/article/add', params)

//删除文章
// export const delArticle = params => del('/article/delete', params)
export const delArticle = params => del('/article/delete', params)

//修改文章
// export const putArticle = params => put('/article/update', params)
export const putArticle = params => post('/article/update', params)

//文章列表 
export const allArticle = params => get('/article/findAll', params)

//地域列表
export const territory = () => get('/territory/findAll')

//首页图片获取
export const indexPic = () => get('/titleImg/findByState')

//添加首页图片
export const addIndexPic = params => post('/titleImg/add', params)

//删除首页图片
// export const delIndexPic = params => del('/titleImg/delete', params)
export const delIndexPic = params => del('/titleImg/delete', params)
//首页图片分页
export const allPics = params => get('/titleImg/findAll', params)
//修改首页图片

// export const putIndexPic = params => put('/titleImg/update', params)
export const putIndexPic = params => post('/titleImg/update', params)


//新增视频
export const addVideo = params => post('/videoNews/add', params)

//删除视频
// export const delVideo = params => del('/videoNews/delete', params)
export const delVideo = params => del('/videoNews/delete', params)

//修改视频
// export const putVideo = params => put('/videoNews/update', params)
export const putVideo = params => post('/videoNews/update', params)

//视频列表
export const allVideo = params => get('/videoNews/findAll', params)


//合作单位新增
export const addFriend = params => post('/blogroll/add', params)

//合作单位删除
// export const delFriend = params => del('/blogroll/delete', params)
export const delFriend = params => del('/blogroll/delete', params)

//合作单位修改
// export const putFriend = params => put('/blogroll/update', params)
export const putFriend = params => post('/blogroll/update', params)

//合作单位列表
export const getFriend = params => get('/blogroll/findAll', params)

//用户操作记录
export const log = params => get('/operationNote/findAll', params)